package com.ruoyi.carService.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.api.domain.ServiceDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.carService.mapper.ServiceDetailsMapper;
import com.ruoyi.system.api.domain.ServiceDetails;
import com.ruoyi.carService.service.IServiceDetailsService;

/**
 * 服务详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-11
 * @date 2024-09-07
 */
@Service
public class ServiceDetailsServiceImpl implements IServiceDetailsService 
{
    @Autowired
    private ServiceDetailsMapper serviceDetailsMapper;

    @Override
    public int selectServiceDetialsCount1() {
        return serviceDetailsMapper.selectServiceDetialsCount1();
    }
    @Override
    public int selectServiceDetialsCount2() {
        return serviceDetailsMapper.selectServiceDetialsCount2();
    }
    @Override
    public int selectServiceDetialsCount3() {
        return serviceDetailsMapper.selectServiceDetialsCount3();
    }
    @Override
    public int selectServiceDetialsCount4() {
        return serviceDetailsMapper.selectServiceDetialsCount4();
    }

    /**
     * 查询服务详情
     * 
     * @param serviceDetailsId 服务详情主键
     * @return 服务详情
     */
    @Override
    public ServiceDetails selectServiceDetailsByServiceDetailsId(Long serviceDetailsId)
    {
        return serviceDetailsMapper.selectServiceDetailsByServiceDetailsId(serviceDetailsId);
    }

    /**
     * 查询服务详情列表
     * 
     * @param serviceDetails 服务详情
     * @return 服务详情
     */
    @Override
    public List<ServiceDetails> selectServiceDetailsList(ServiceDetails serviceDetails)
    {
        return serviceDetailsMapper.selectServiceDetailsList(serviceDetails);
    }

    /**
     * 新增服务详情
     * 
     * @param serviceDetails 服务详情
     * @return 结果
     */
    @Override
    public int insertServiceDetails(ServiceDetails serviceDetails)
    {
        serviceDetails.setCreateTime(DateUtils.getNowDate());
        return serviceDetailsMapper.insertServiceDetails(serviceDetails);
    }

    /**
     * 修改服务详情
     * 
     * @param serviceDetails 服务详情
     * @return 结果
     */
    @Override
    public int updateServiceDetails(ServiceDetails serviceDetails)
    {
        return serviceDetailsMapper.updateServiceDetails(serviceDetails);
    }

    /**
     * 批量删除服务详情
     * 
     * @param serviceDetailsIds 需要删除的服务详情主键
     * @return 结果
     */
    @Override
    public int deleteServiceDetailsByServiceDetailsIds(Long[] serviceDetailsIds)
    {
        return serviceDetailsMapper.deleteServiceDetailsByServiceDetailsIds(serviceDetailsIds);
    }

    /**
     * 删除服务详情信息
     * 
     * @param serviceDetailsId 服务详情主键
     * @return 结果
     */
    @Override
    public int deleteServiceDetailsByServiceDetailsId(Long serviceDetailsId)
    {
        return serviceDetailsMapper.deleteServiceDetailsByServiceDetailsId(serviceDetailsId);
    }
}
